import React from 'react';
import {NavLink} from "react-router-dom";
import routers from './routers'
import './App.css'

function App(props) {
    return (
        <div className={'container'}>
            <nav>
                <NavLink className={({isActive})=>isActive? 'active':''} to={'/'}>添加商品</NavLink>
                <NavLink className={({isActive})=>isActive? 'active':''} to={'/goodsList'}>商品列表</NavLink>
                <NavLink className={({isActive})=>isActive? 'active':''} to={'/cartList'}>购物车</NavLink>
            </nav>
            {
                routers()
            }
        </div>
    );
}

export default App;